import parole
from parole.colornames import colors
from parole.display import interpolateRGB
import pygame, random

import sim, main
from util import *
from dungeon import makeFloor, Room, TemplateRoom
import dungeon

template = \
"""
###############################
#                       #    ##
#                       #     #
##                            #
#      ########               #
#      # W %]w#               #
##     ########              ##
#                             #
#                             #
#                             #
###                           #
#                            ##
#      #          ##         ##
###############################
"""[1:]

legend = {
    'W':    dungeon.thingGenerator('monsters', 'swordwraith'),

    'w':    dungeon.thingGenerator('monsters', 'burrowingworm'),

    ']':    dungeon.thingGenerator('armor', 'trollbracer'),

    '%':    parole.map.MapObjectGenerator("", 
            lambda: sim.Obj('ancient bones', 10, parole.map.AsciiTile('%',
                colors['White']),
                blockMove=False, massNoun=True), clearFirst=False),

    '#':    dungeon.rockGenerator(colors['DimGray']),
}

floorColor1 = colors['SandyBrown']
floorColor2 = colors['SaddleBrown']
floorName = 'dirt floor'
mixture = 0.5

diggable = [
    (0,6), (0, 15), (0, 19), (8, 0), 
]

class MessHall(TemplateRoom):
    def __init__(self, pos):
        TemplateRoom.__init__(self, template, legend, diggable, pos,
                floorColor1, floorColor2, mixture, floorName)


roomClass = MessHall


